%!PS-Adobe-2.0 EPSF-1.2
%%BoundingBox: 0.0 0.0 500.0 200.0
%%%EndComments

/nD 10 def
/nL 12 def
/nL  0 def
/nU 15 def
/margin 0 def
/xscale 500 margin 2 mul sub nD nL add div def
/yscale 500 margin 2 mul sub nD nU add div def
xscale yscale le { % true action -- if else
   /yscale xscale def
} { % false action -- if else
   /xscale yscale def
} ifelse
(xscale) == xscale ==
(yscale) == yscale ==

margin margin 500 200 rectstroke
gsave
%
%  translate, scale and rotate
%
   margin margin translate
   xscale yscale scale
   0.05 setlinewidth
   0 nD nL add translate
   -90 rotate
%
% draw the outlines of the three DA2 objects
%
   0.0  setgray
   0  0 nD nD rectstroke
%  nD 0 nL nD rectstroke
   0 nD nD nU rectstroke
%
% draw the thick edges
%
0 1 nD 1 sub {
   /ix exch def
   newpath
   ix 0.5 add ix 0.5 add moveto
   0 nD nU add ix sub 1 sub rlineto
%  ix 0.5 add ix 0.5 add moveto
%  nD nL add ix sub 1 sub 0 rlineto
   stroke
} for
%
% draw the circles that represent entries
%
/r 0.2 def
/x 0.5 def
0 1 nD 1 sub {
   /ix exch def
   /y x def
   0 1 nD nU ix sub add 1 sub {
      newpath
      1.0 setgray
      pop x r add y moveto x y r 0 360 arc
      fill
      newpath
      0.0 setgray
      x r add y moveto x y r 0 360 arc
      stroke
      /y y 1 add def
   } for
   /x x 1 add def
} for
% /x nD 0.5 add def
% 0 1 nL 1 sub {
%    /y 0.5 def
%    0 1 nD 1 sub {
%       pop 
%       newpath
%       1.0 setgray
%       x r add y moveto x y r 0 360 arc
%       fill
%       newpath
%       0.0 setgray
%       x r add y moveto x y r 0 360 arc
%       stroke
%       /y y 1 add def
%    } for
%    /x x 1 add def
% } for
stroke
grestore

showpage
